<!--
  描述：树形结构下拉框实时获取数据，并初始化回填数据html结构
  公司：xxx有限公司
  版权：xxx2020
  修改者：oyjl
  时间：2020-04-03 10:18:46
  -->
<div class="tree-main" [ngStyle]="{'width': treeConfig.width}">
  <div class="tree-input" (click)="dropdownTreeHandle(inputIcon)">
    <label>{{selectorTreeStr || '请选择'}}</label>
    <i #inputIcon class="pi pi-chevron-down"></i>
  </div>
  <div *ngIf="treeConfig.disabled" class="tree-input tree-mask"></div>
  <div class="tree-list" *ngIf="showTree" [ngClass]="{'tree-main-body': treeConfig.appendTo === 'body'}">
    <p-tree *ngIf="trees && trees.length > 0" [value]="trees" [(selection)]="selectedTrees"
      [selectionMode]="treeConfig.selectionMode" [filter]="treeConfig.filter" [filterBy]="treeConfig.filterBy"
      [filterMode]="treeConfig.filterMode" [filterPlaceholder]="treeConfig.filterPlaceholder"
      [propagateSelectionUp]="treeConfig.propagateSelectionUp"
      [propagateSelectionDown]="treeConfig.propagateSelectionDown" (onNodeSelect)="onNodeSelect($event)"
      (onNodeUnselect)="onNodeUnselect($event)"></p-tree>
    <label *ngIf="!trees || trees.length === 0">没有数据</label>
  </div>
</div>
